package cn.itsource.ymcc.service;

import cn.itsource.ymcc.domain.CourseOrder;
import cn.itsource.ymcc.dto.KillPlaceOrderDto;
import cn.itsource.ymcc.dto.PlaceOrderDto;
import cn.itsource.ymcc.query.CourseOrderQuery;
import cn.itsource.ymcc.result.JSONResult;
import cn.itsource.ymcc.result.PageList;
import cn.itsource.ymcc.to.PlaceCourseOrderTo;
import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author whale
 * @since 2021-09-23
 */
public interface ICourseOrderService extends IService<CourseOrder> {

    /**
     * 下单逻辑
     */
    JSONResult placeOrder(PlaceOrderDto dto);

    JSONResult saveOrder(PlaceCourseOrderTo placeCourseOrderTo);

    CourseOrder selectByOrderNo(String orderNo);

    void closeOrder(PlaceCourseOrderTo placeCourseOrderTo);

    PageList selectPage(CourseOrderQuery query);

    JSONResult killPlaceOrder(KillPlaceOrderDto dto);

    String createTokenForOrder();
}
